package jok.thread;

public class SyncTicketThreadWithStaticMethod implements Runnable {

	@Override
	public void run() {
		sale();
	}

	private synchronized static void sale() {
		System.out.println(Thread.currentThread().getName() + "：开始卖票");
		try {
			Thread.sleep(10);// 休眠10毫秒
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println(Thread.currentThread().getName() + "：结束卖票");
	}

}